package sns.app.nhwc;

import java.util.ArrayList;

//maybe connect to the database to get the keyword
//or read in a file to get the keyword
public class KeywordDictionary {
	
	private int keywordNum;
	private ArrayList<String> keywords;
	
	private KeywordDictionary(){
		keywords = new ArrayList<String>();
		keywords.add("烟花");
		keywords.add("儿童");
		keywords.add("宇宙");
		keywords.add("狼");
		keywords.add("猫");
		keywords.add("狗");
		keywords.add("稻草人");
		keywords.add("偷拍");
		keywords.add("兄弟");
		keywords.add("风景");
		keywords.add("农村");
		keywords.add("天鹅");
		
		keywordNum = keywords.size();		
	}
	
	public int getKeywordNum(){
		return keywordNum;
	}
	
	public String getKeywordAtIndex(int index){
		if(index<keywordNum){
			return keywords.get(index);
		}else{
			return null;
		}		
	}
	
	private static class KeywordDictionaryHolder{
		public static final KeywordDictionary KD = new KeywordDictionary();
	}
	
	public static KeywordDictionary getInstance(){
		return KeywordDictionaryHolder.KD;
	}
}
